import type { FormRules } from 'element-plus'

// 权限表单
export interface DefaultForm {
  authorityName: string
  authorityPath: string
  description: string
}

// 重置表单（默认值）
export const defaultForm: DefaultForm = {
  authorityName: '',
  authorityPath: '',
  description: '',
}

// 验证规则
export const formRule: FormRules<DefaultForm> = {
  authorityName: [
    { required: true, message: '权限名称不可为空！', trigger: 'blur' }
  ],
  authorityPath: [
    { required: true, message: '权限路径不可为空！', trigger: 'blur' },
  ]
}
